<template>
  <div>
    <!-- 查询条件 -->
    <div class="overtable-btns spe-btn">
      <span class="table-title">银行卡列表</span>
      <!-- <el-button size="mini" type="warning" icon="el-icon-download">报表导出</el-button> -->
    </div>
    <!-- 表格 -->
    <!-- v-loading="loading" -->
    <el-table :data="datahh" tooltip-effect="dark" size="small">
      <el-table-column type="index" label="序号" fixed="left" />
      <el-table-column prop="ww" label="卡号" />
      <el-table-column prop="qq" label="账户名" />
      <el-table-column prop="ee" label="开户行" width="130" />
      <el-table-column prop="rr" label="开户支行" width="100" />
      <el-table-column prop="tt" label="银行卡状态" width="130" />
      <el-table-column prop="ii" label="绑定时间" width="200">
        <template slot-scope="scope">
          <span>{{scope.row.ii}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="90" fixed="right">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="toModify(scope.row)">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!--分页组件-->
    <el-pagination
      :total="total"
      :current-page="page"
      :pager-count="5"
      style="margin-top: 8px;"
      layout="total, prev, pager, next, sizes, jumper"
      @size-change="sizeChange"
      @current-change="pageChange"
    />
    <div class="dialog-wrap">
      <!-- 编辑银行卡列表弹窗 -->
      <el-dialog title="编辑" :append-to-body="true" :visible.sync="bankVis" width="600px">
        <el-form class="form-wrap adjust-dialog" :model="bankForm" size="small" label-width="120px">
          <el-form-item label="账户类型:">
            <el-select v-model="bankForm.accType" placeholder="账户类型" clearable>
              <el-option
                v-for="item in accountType"
                :key="item.key"
                :label="item.display_name"
                :value="item.key"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="账户名:">
            <el-input v-model.trim="bankForm.name" placeholder="请输入数字（小数点后2位）" clearable />
          </el-form-item>
          <el-form-item label="账号:">
            <el-input v-model.trim="bankForm.num" placeholder="请输入数字（小数点后2位）" clearable />
          </el-form-item>
          <el-form-item label="开户行:">
            <el-input v-model.trim="bankForm.bankname" placeholder="请输入数字（小数点后2位）" clearable />
          </el-form-item>
          <el-form-item label="开户支行:">
            <el-input v-model.trim="bankForm.branchbank" placeholder="请输入数字（小数点后2位）" clearable />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button>取 消</el-button>
          <el-button type="primary">确 定</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import dateSelect from '@/components/DateSelect/index'
import initTable from '@/mixins/initTable'
export default {
  mixins: [initTable],
  components: {
    dateSelect
  },
  data() {
    return {
      bankVis: false,
      bankForm: {
        accType: '',
        name: '',
        num: '',
        bankname: '',
        branchname: ''
      },
      refundType: [
        { key: '1', display_name: '原路退回' },
        { key: '2', display_name: '其他' }
      ],
      refundStatus: [
        { key: '0', display_name: '退款中' },
        { key: '1', display_name: '退款成功' },
        { key: '2', display_name: '退款失败' }
      ],
      accountType: [
        { key: 0, display_name: '对公账户' },
        { key: 1, display_name: '法人账户' },
        { key: 2, display_name: '非法人账户' }
      ],
      datahh: [
        {
          qq: '2016-05-02',
          ww: '王小虎',
          ee: '上海',
          rr: '普陀区',
          tt: '上海市普陀区',
          yy: '200333',
          uu: '17612775057',
          ii: 'hahahahha',
          oo: '上海市普陀区',
          pp: '200333',
          aa: '17612775057',
          ss: 'hahahahha',
          dd: 'hahahahha'
        },
        {
          qq: '2016-05-02',
          ww: '王小虎',
          ee: '上海',
          rr: '普陀区',
          tt: '上海市普陀区',
          yy: '200333',
          uu: '17612775057',
          ii: 'hahahahha',
          oo: '上海市普陀区',
          pp: '200333',
          aa: '17612775057',
          ss: 'hahahahha',
          dd: 'hahahahha'
        }
      ]
    }
  },
  methods: {
    toModify(item) {
      console.log(item)
      this.bankVis = true
    },
    reset() {
      this.toReset()
      this.$refs.dateSelect.clearDate()
      this.$refs.areaSelect.clearArea()
    }
  }
}
</script>

<style lang="scss" scoped>
</style>